package com.example.controller;

import com.example.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class IndexController {
    @Autowired
    private UserService userService;

    @PostMapping(value = "/order/details")
    public Map<String, Integer> listUserOrderDetails(@RequestParam(value = "idx") int idx) {
        return userService.listOrderDetails(idx);
    }
}
